<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
</head>
<body style="margin:0px;">
    <div id="main" align="center" style="width:100%;height:100%;">
        <img id="push_me" src="push_me.gif" style="cursor:hand;display:block;" />
    </div>
    <script type="text/javascript">
    <!--
    (function() {
        var title = location.search.match(new RegExp('[\?\&](title|t)=([^\&]+)', 'i'));
        if (title && title.length > 1) {
            document.title = decodeURIComponent(title[2]);
        }
        var contact = location.search.match(new RegExp('[\?\&](contact|c)=([^\&]+)', 'i'));
        var link;
        if (contact && contact.length > 1) {
            contact = decodeURIComponent(contact[2]);
            console.log('contact: ' + contact);
            link = document.createElement('a');
            link.href = contact;
            link.style = 'font-size:36px;font-weight:bold;';
            link.appendChild(document.createTextNode('>>> 点击这里联系我 <<<'));
            main.appendChild(link);
        }
        var push_me = document.getElementById('push_me');
        push_me.onclick = function() {
            var main = document.getElementById('main');
            main.removeChild(push_me);
            if (link) {
                main.removeChild(link);
            }
            var url = location.search.match(new RegExp('[\?\&](url|u)=([^\&]+)', 'i'));
            if (url && url.length > 1) {
                url = atob(url[2]);
                console.log('url: ' + url);
                if (url.endsWith('.mp4')) {
                    var video = document.createElement('video');
                    video.src = url;
                    video.autoplay = 'autoplay';
                    video.controls = 'controls';
                    video.style = 'width:100%;height:100%;object-fit:contain;';
                    main.appendChild(video);
                } else {
                    var img = document.createElement('img');
                    img.src = url;
                    img.style = 'width:100%;height:100%;object-fit:contain;';
                    main.appendChild(img);
                }
            }
        };
    })();
    -->
    </script>
</body>
</html>